import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:liuxlcommon/view/lxl_widget.dart';
import 'package:liuxlcommon/view/my_style.dart';
import 'package:love_newf/app/com/view/my_app_bar.dart';
import 'package:love_newf/value/app_lstyle.dart';

import 'complaint_logic.dart';

class ComplaintPage extends StatefulWidget {
  const ComplaintPage({Key? key}) : super(key: key);

  @override
  State<ComplaintPage> createState() => _ComplaintPageState();
}

class _ComplaintPageState extends State<ComplaintPage> {
  final ComplaintLogic logic = Get.put(ComplaintLogic());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: MyAppBar("投诉反馈"),
      body: LColumn.eazy([
        LExpand(
          child: ListView(
            children: [
              LInput(
                logic.firstMsg,
                lStyle: LStyle(
                    hintText: "请输入反馈信息！",
                    padding: EdgeInsets.only(top: 10.w), ),
              )
                  .onChange((text) => logic.firstMsg = text)
                  .size(double.infinity, 100.w)
            ],
          ),
        ),
        LText("提交").style(rzBtnSty).onTapL(() {
          logic.submit();
        })
      ]).paddingAll(20.w),
    );
  }

  @override
  void dispose() {
    Get.delete<ComplaintLogic>();
    super.dispose();
  }
}
